package com.fubowen.lepton.ui.search

import com.fubowen.reader.book.impl.FileBook
import com.fubowen.reader.book.impl.WebBook
import kotlinx.coroutines.runBlocking
import org.junit.Test
import org.junit.jupiter.api.Assertions
import java.io.File

class BookTest {
    private val file = File("C:\\Users\\Fubowen\\Downloads\\1.txt")
    private val url = "https://www.qishuta.org/du/7/7310/9965631.html"

    @Test
    fun testFileBook(): Unit {
        runBlocking {
            FileBook(file.absolutePath) {
//                Assertions.assertTrue(isGetCatalog)
            }
        }
    }

    @Test
    fun testWebBook(): Unit {

        WebBook(url) {
            Assertions.assertTrue(isGetCatalogState)
        }
    }
}